package com.campus.merchant.bean.goods;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

/**
 * 商品编辑入参对象
 */
@Data
@ApiModel("商品编辑入参对象")
public class GoodsUpdateBean {
    @ApiModelProperty("商品ID")
    @NotNull(message = "商品ID不能为空")
    private Integer id;

    @ApiModelProperty("商品名称")
    @NotBlank(message = "商品名称不能为空")
    private String name;

    @ApiModelProperty("商品价格")
    @NotNull(message = "商品价格不能为空")
    private BigDecimal price;

    @ApiModelProperty("商品图片URL")
    @NotBlank(message = "商品图片不能为空")
    private String image;

    @ApiModelProperty("商品描述")
    private String description;

    @ApiModelProperty("打包费")
    private BigDecimal packagingFee;

    @ApiModelProperty("所属分类ID")
    @NotNull(message = "商品分类不能为空")
    private Integer categoryId;

    @ApiModelProperty("所属商户ID")
    @NotNull(message = "商户ID不能为空")
    private Integer merchantId;

    @ApiModelProperty("状态：1-上架，0-下架")
    @NotNull(message = "商品状态不能为空")
    private Integer status;

    @ApiModelProperty("规格组及选项JSON字符串")
    private String specJson;
}